package pojo;

import java.util.Collection;
import java.util.Objects;

public class TbUser {
    private Integer userId;
    private String userName;
    private String userPassword;
    private String userTel;
    private Integer userLevel;
    private String userEmail;
    private String userImg;
    private Collection<TbAccount> tbAccountsByUserId;
    private Collection<TbBankcard> tbBankcardsByUserId;
    private Collection<TbOrder> tbOrdersByUserId;
    private Collection<TbPhoneRecord> tbPhoneRecordsByUserId;
    private Collection<TbShoppingcar> tbShoppingcarsByUserId;
    private Collection<TbUserRole> tbUserRolesByUserId;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getUserTel() {
        return userTel;
    }

    public void setUserTel(String userTel) {
        this.userTel = userTel;
    }

    public Integer getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(Integer userLevel) {
        this.userLevel = userLevel;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserImg() {
        return userImg;
    }

    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbUser tbUser = (TbUser) o;
        return Objects.equals(userId, tbUser.userId) &&
                Objects.equals(userName, tbUser.userName) &&
                Objects.equals(userPassword, tbUser.userPassword) &&
                Objects.equals(userTel, tbUser.userTel) &&
                Objects.equals(userLevel, tbUser.userLevel) &&
                Objects.equals(userEmail, tbUser.userEmail) &&
                Objects.equals(userImg, tbUser.userImg);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, userName, userPassword, userTel, userLevel, userEmail, userImg);
    }

    public Collection<TbAccount> getTbAccountsByUserId() {
        return tbAccountsByUserId;
    }

    public void setTbAccountsByUserId(Collection<TbAccount> tbAccountsByUserId) {
        this.tbAccountsByUserId = tbAccountsByUserId;
    }

    public Collection<TbBankcard> getTbBankcardsByUserId() {
        return tbBankcardsByUserId;
    }

    public void setTbBankcardsByUserId(Collection<TbBankcard> tbBankcardsByUserId) {
        this.tbBankcardsByUserId = tbBankcardsByUserId;
    }

    public Collection<TbOrder> getTbOrdersByUserId() {
        return tbOrdersByUserId;
    }

    public void setTbOrdersByUserId(Collection<TbOrder> tbOrdersByUserId) {
        this.tbOrdersByUserId = tbOrdersByUserId;
    }

    public Collection<TbPhoneRecord> getTbPhoneRecordsByUserId() {
        return tbPhoneRecordsByUserId;
    }

    public void setTbPhoneRecordsByUserId(Collection<TbPhoneRecord> tbPhoneRecordsByUserId) {
        this.tbPhoneRecordsByUserId = tbPhoneRecordsByUserId;
    }

    public Collection<TbShoppingcar> getTbShoppingcarsByUserId() {
        return tbShoppingcarsByUserId;
    }

    public void setTbShoppingcarsByUserId(Collection<TbShoppingcar> tbShoppingcarsByUserId) {
        this.tbShoppingcarsByUserId = tbShoppingcarsByUserId;
    }

    public Collection<TbUserRole> getTbUserRolesByUserId() {
        return tbUserRolesByUserId;
    }

    public void setTbUserRolesByUserId(Collection<TbUserRole> tbUserRolesByUserId) {
        this.tbUserRolesByUserId = tbUserRolesByUserId;
    }
}
